var express = require('express');
var router = express.Router();
const adminController = require("../controllers/admin_controller")
/* GET users listing. */
router.get('/', function (req, res, next) {
  res.send('respond with a resource');
});
router.post('/login', function (req, res, next) {
  // console.log(req);
  
 const {username,password}=req.body
 console.log(password);
  adminController.doAdminLogin({username,password}, ["登录失败", "登录成功"], (result) => {
    res.json(result)
  })
});

module.exports = router;